package com.tedu.micro.service.controller;

import com.tarena.micro.service.common.result.JsonResult;
import com.tarena.micro.service.pojo.param.OrderAddParam;
import com.tedu.micro.service.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class OrderController {
    @Autowired
    private OrderService orderService;
    @PostMapping("/order/add")
    public JsonResult addOrder(OrderAddParam param){
        //业务调用 让业务层帮助我完成新增订单功能 反馈成功失败
        orderService.addOrder(param);
        return JsonResult.ok();
    }
}
